* Step 1: DependencyPairs WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict TRS:
half(0()) -> 0()
half(s(s(x))) -> s(half(x))
log(s(0())) -> 0()
log(s(s(x))) -> s(log(s(half(x))))
- Signature:
{half/1,log/1} / {0/0,s/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {half,log} and constructors {0,s}
+ Applied Processor:
DependencyPairs {dpKind_ = WIDP}
+ Details:
We add the following weak innermost dependency pairs:
Strict DPs
half#(0()) -> c_1()
half#(s(s(x))) -> c_2(half#(x))
log#(s(0())) -> c_3()
log#(s(s(x))) -> c_4(log#(s(half(x))))
Weak DPs
and mark the set of starting terms.
* Step 2: UsableRules WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
half#(0()) -> c_1()
half#(s(s(x))) -> c_2(half#(x))
log#(s(0())) -> c_3()
log#(s(s(x))) -> c_4(log#(s(half(x))))
- Strict TRS:
half(0()) -> 0()
half(s(s(x))) -> s(half(x))
log(s(0())) -> 0()
log(s(s(x))) -> s(log(s(half(x))))
- Signature:
{half/1,log/1,half#/1,log#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {half#,log#} and constructors {0,s}
+ Applied Processor:
UsableRules
+ Details:
We replace rewrite rules by usable rules:
half(0()) -> 0()
half(s(s(x))) -> s(half(x))
half#(0()) -> c_1()
half#(s(s(x))) -> c_2(half#(x))
log#(s(0())) -> c_3()
log#(s(s(x))) -> c_4(log#(s(half(x))))
* Step 3: WeightGap WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
half#(0()) -> c_1()
half#(s(s(x))) -> c_2(half#(x))
log#(s(0())) -> c_3()
log#(s(s(x))) -> c_4(log#(s(half(x))))
- Strict TRS:
half(0()) -> 0()
half(s(s(x))) -> s(half(x))
- Signature:
{half/1,log/1,half#/1,log#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {half#,log#} and constructors {0,s}
+ Applied Processor:
WeightGap {wgDimension = 1, wgDegree = 1, wgKind = Algebraic, wgUArgs = UArgs, wgOn = WgOnTrs}
+ Details:
The weightgap principle applies using the following constant growth matrix-interpretation:
We apply a matrix interpretation of kind constructor based matrix interpretation:
The following argument positions are considered usable:
uargs(s) = {1},
uargs(log#) = {1},
uargs(c_2) = {1},
uargs(c_4) = {1}
Following symbols are considered usable:
all
TcT has computed the following interpretation:
p(0) = [0]
p(half) = [1] x1 + [5]
p(log) = [0]
p(s) = [1] x1 + [1]
p(half#) = [8] x1 + [0]
p(log#) = [1] x1 + [0]
p(c_1) = [0]
p(c_2) = [1] x1 + [0]
p(c_3) = [0]
p(c_4) = [1] x1 + [0]
Following rules are strictly oriented:
half#(s(s(x))) = [8] x + [16]
> [8] x + [0]
= c_2(half#(x))
log#(s(0())) = [1]
> [0]
= c_3()
half(0()) = [5]
> [0]
= 0()
half(s(s(x))) = [1] x + [7]
> [1] x + [6]
= s(half(x))
Following rules are (at-least) weakly oriented:
half#(0()) = [0]
>= [0]
= c_1()
log#(s(s(x))) = [1] x + [2]
>= [1] x + [6]
= c_4(log#(s(half(x))))
Further, it can be verified that all rules not oriented are covered by the weightgap condition.
* Step 4: RemoveWeakSuffixes WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
half#(0()) -> c_1()
log#(s(s(x))) -> c_4(log#(s(half(x))))
- Weak DPs:
half#(s(s(x))) -> c_2(half#(x))
log#(s(0())) -> c_3()
- Weak TRS:
half(0()) -> 0()
half(s(s(x))) -> s(half(x))
- Signature:
{half/1,log/1,half#/1,log#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {half#,log#} and constructors {0,s}
+ Applied Processor:
RemoveWeakSuffixes
+ Details:
Consider the dependency graph
1:S:half#(0()) -> c_1()
2:S:log#(s(s(x))) -> c_4(log#(s(half(x))))
-->_1 log#(s(0())) -> c_3():4
-->_1 log#(s(s(x))) -> c_4(log#(s(half(x)))):2
3:W:half#(s(s(x))) -> c_2(half#(x))
-->_1 half#(s(s(x))) -> c_2(half#(x)):3
-->_1 half#(0()) -> c_1():1
4:W:log#(s(0())) -> c_3()
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
4: log#(s(0())) -> c_3()
* Step 5: Decompose WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
half#(0()) -> c_1()
log#(s(s(x))) -> c_4(log#(s(half(x))))
- Weak DPs:
half#(s(s(x))) -> c_2(half#(x))
- Weak TRS:
half(0()) -> 0()
half(s(s(x))) -> s(half(x))
- Signature:
{half/1,log/1,half#/1,log#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {half#,log#} and constructors {0,s}
+ Applied Processor:
Decompose {onSelection = all cycle independent sub-graph, withBound = RelativeAdd}
+ Details:
We analyse the complexity of following sub-problems (R) and (S).
Problem (S) is obtained from the input problem by shifting strict rules from (R) into the weak component.
Problem (R)
- Strict DPs:
half#(0()) -> c_1()
- Weak DPs:
half#(s(s(x))) -> c_2(half#(x))
log#(s(s(x))) -> c_4(log#(s(half(x))))
- Weak TRS:
half(0()) -> 0()
half(s(s(x))) -> s(half(x))
- Signature:
{half/1,log/1,half#/1,log#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {half#,log#} and constructors {0,s}
Problem (S)
- Strict DPs:
log#(s(s(x))) -> c_4(log#(s(half(x))))
- Weak DPs:
half#(0()) -> c_1()
half#(s(s(x))) -> c_2(half#(x))
- Weak TRS:
half(0()) -> 0()
half(s(s(x))) -> s(half(x))
- Signature:
{half/1,log/1,half#/1,log#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {half#,log#} and constructors {0,s}
** Step 5.a:1: RemoveWeakSuffixes WORST_CASE(?,O(1))
+ Considered Problem:
- Strict DPs:
half#(0()) -> c_1()
- Weak DPs:
half#(s(s(x))) -> c_2(half#(x))
log#(s(s(x))) -> c_4(log#(s(half(x))))
- Weak TRS:
half(0()) -> 0()
half(s(s(x))) -> s(half(x))
- Signature:
{half/1,log/1,half#/1,log#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {half#,log#} and constructors {0,s}
+ Applied Processor:
RemoveWeakSuffixes
+ Details:
Consider the dependency graph
1:S:half#(0()) -> c_1()
2:W:log#(s(s(x))) -> c_4(log#(s(half(x))))
-->_1 log#(s(s(x))) -> c_4(log#(s(half(x)))):2
3:W:half#(s(s(x))) -> c_2(half#(x))
-->_1 half#(0()) -> c_1():1
-->_1 half#(s(s(x))) -> c_2(half#(x)):3
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
2: log#(s(s(x))) -> c_4(log#(s(half(x))))
** Step 5.a:2: UsableRules WORST_CASE(?,O(1))
+ Considered Problem:
- Strict DPs:
half#(0()) -> c_1()
- Weak DPs:
half#(s(s(x))) -> c_2(half#(x))
- Weak TRS:
half(0()) -> 0()
half(s(s(x))) -> s(half(x))
- Signature:
{half/1,log/1,half#/1,log#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {half#,log#} and constructors {0,s}
+ Applied Processor:
UsableRules
+ Details:
We replace rewrite rules by usable rules:
half#(0()) -> c_1()
half#(s(s(x))) -> c_2(half#(x))
** Step 5.a:3: PredecessorEstimationCP WORST_CASE(?,O(1))
+ Considered Problem:
- Strict DPs:
half#(0()) -> c_1()
- Weak DPs:
half#(s(s(x))) -> c_2(half#(x))
- Signature:
{half/1,log/1,half#/1,log#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {half#,log#} and constructors {0,s}
+ Applied Processor:
PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalMI {miDimension = 1, miDegree = 0, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}}
+ Details:
We first use the processor NaturalMI {miDimension = 1, miDegree = 0, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing} to orient following rules strictly:
1: half#(0()) -> c_1()
The strictly oriented rules are moved into the weak component.
*** Step 5.a:3.a:1: NaturalMI WORST_CASE(?,O(1))
+ Considered Problem:
- Strict DPs:
half#(0()) -> c_1()
- Weak DPs:
half#(s(s(x))) -> c_2(half#(x))
- Signature:
{half/1,log/1,half#/1,log#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {half#,log#} and constructors {0,s}
+ Applied Processor:
NaturalMI {miDimension = 1, miDegree = 0, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just first alternative for predecessorEstimation on any intersect of rules of CDG leaf and strict-rules}
+ Details:
We apply a matrix interpretation of kind constructor based matrix interpretation (containing no more than 0 non-zero interpretation-entries in the diagonal of the component-wise maxima):
The following argument positions are considered usable:
uargs(c_2) = {1}
Following symbols are considered usable:
{half#,log#}
TcT has computed the following interpretation:
p(0) = [0]
p(half) = [0]
p(log) = [0]
p(s) = [6]
p(half#) = [5]
p(log#) = [4] x1 + [0]
p(c_1) = [0]
p(c_2) = [1] x1 + [0]
p(c_3) = [1]
p(c_4) = [4] x1 + [0]
Following rules are strictly oriented:
half#(0()) = [5]
> [0]
= c_1()
Following rules are (at-least) weakly oriented:
half#(s(s(x))) = [5]
>= [5]
= c_2(half#(x))
*** Step 5.a:3.a:2: Assumption WORST_CASE(?,O(1))
+ Considered Problem:
- Weak DPs:
half#(0()) -> c_1()
half#(s(s(x))) -> c_2(half#(x))
- Signature:
{half/1,log/1,half#/1,log#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {half#,log#} and constructors {0,s}
+ Applied Processor:
Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}}
+ Details:
()
*** Step 5.a:3.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1))
+ Considered Problem:
- Weak DPs:
half#(0()) -> c_1()
half#(s(s(x))) -> c_2(half#(x))
- Signature:
{half/1,log/1,half#/1,log#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {half#,log#} and constructors {0,s}
+ Applied Processor:
RemoveWeakSuffixes
+ Details:
Consider the dependency graph
1:W:half#(0()) -> c_1()
2:W:half#(s(s(x))) -> c_2(half#(x))
-->_1 half#(s(s(x))) -> c_2(half#(x)):2
-->_1 half#(0()) -> c_1():1
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
2: half#(s(s(x))) -> c_2(half#(x))
1: half#(0()) -> c_1()
*** Step 5.a:3.b:2: EmptyProcessor WORST_CASE(?,O(1))
+ Considered Problem:
- Signature:
{half/1,log/1,half#/1,log#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {half#,log#} and constructors {0,s}
+ Applied Processor:
EmptyProcessor
+ Details:
The problem is already closed. The intended complexity is O(1).
** Step 5.b:1: RemoveWeakSuffixes WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
log#(s(s(x))) -> c_4(log#(s(half(x))))
- Weak DPs:
half#(0()) -> c_1()
half#(s(s(x))) -> c_2(half#(x))
- Weak TRS:
half(0()) -> 0()
half(s(s(x))) -> s(half(x))
- Signature:
{half/1,log/1,half#/1,log#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {half#,log#} and constructors {0,s}
+ Applied Processor:
RemoveWeakSuffixes
+ Details:
Consider the dependency graph
1:S:log#(s(s(x))) -> c_4(log#(s(half(x))))
-->_1 log#(s(s(x))) -> c_4(log#(s(half(x)))):1
2:W:half#(0()) -> c_1()
3:W:half#(s(s(x))) -> c_2(half#(x))
-->_1 half#(s(s(x))) -> c_2(half#(x)):3
-->_1 half#(0()) -> c_1():2
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
3: half#(s(s(x))) -> c_2(half#(x))
2: half#(0()) -> c_1()
** Step 5.b:2: PredecessorEstimationCP WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
log#(s(s(x))) -> c_4(log#(s(half(x))))
- Weak TRS:
half(0()) -> 0()
half(s(s(x))) -> s(half(x))
- Signature:
{half/1,log/1,half#/1,log#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {half#,log#} and constructors {0,s}
+ Applied Processor:
PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing}}
+ Details:
We first use the processor NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing} to orient following rules strictly:
1: log#(s(s(x))) -> c_4(log#(s(half(x))))
The strictly oriented rules are moved into the weak component.
*** Step 5.b:2.a:1: NaturalMI WORST_CASE(?,O(n^1))
+ Considered Problem:
- Strict DPs:
log#(s(s(x))) -> c_4(log#(s(half(x))))
- Weak TRS:
half(0()) -> 0()
half(s(s(x))) -> s(half(x))
- Signature:
{half/1,log/1,half#/1,log#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {half#,log#} and constructors {0,s}
+ Applied Processor:
NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just first alternative for predecessorEstimation on any intersect of rules of CDG leaf and strict-rules}
+ Details:
We apply a matrix interpretation of kind constructor based matrix interpretation:
The following argument positions are considered usable:
uargs(c_4) = {1}
Following symbols are considered usable:
{half,half#,log#}
TcT has computed the following interpretation:
p(0) = [1]
p(half) = [1] x1 + [0]
p(log) = [1] x1 + [1]
p(s) = [1] x1 + [2]
p(half#) = [2] x1 + [2]
p(log#) = [4] x1 + [0]
p(c_1) = [2]
p(c_2) = [4] x1 + [8]
p(c_3) = [2]
p(c_4) = [1] x1 + [0]
Following rules are strictly oriented:
log#(s(s(x))) = [4] x + [16]
> [4] x + [8]
= c_4(log#(s(half(x))))
Following rules are (at-least) weakly oriented:
half(0()) = [1]
>= [1]
= 0()
half(s(s(x))) = [1] x + [4]
>= [1] x + [2]
= s(half(x))
*** Step 5.b:2.a:2: Assumption WORST_CASE(?,O(1))
+ Considered Problem:
- Weak DPs:
log#(s(s(x))) -> c_4(log#(s(half(x))))
- Weak TRS:
half(0()) -> 0()
half(s(s(x))) -> s(half(x))
- Signature:
{half/1,log/1,half#/1,log#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {half#,log#} and constructors {0,s}
+ Applied Processor:
Assumption {assumed = Certificate {spaceUB = Unknown, spaceLB = Unknown, timeUB = Poly (Just 0), timeLB = Unknown}}
+ Details:
()
*** Step 5.b:2.b:1: RemoveWeakSuffixes WORST_CASE(?,O(1))
+ Considered Problem:
- Weak DPs:
log#(s(s(x))) -> c_4(log#(s(half(x))))
- Weak TRS:
half(0()) -> 0()
half(s(s(x))) -> s(half(x))
- Signature:
{half/1,log/1,half#/1,log#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {half#,log#} and constructors {0,s}
+ Applied Processor:
RemoveWeakSuffixes
+ Details:
Consider the dependency graph
1:W:log#(s(s(x))) -> c_4(log#(s(half(x))))
-->_1 log#(s(s(x))) -> c_4(log#(s(half(x)))):1
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
1: log#(s(s(x))) -> c_4(log#(s(half(x))))
*** Step 5.b:2.b:2: EmptyProcessor WORST_CASE(?,O(1))
+ Considered Problem:
- Weak TRS:
half(0()) -> 0()
half(s(s(x))) -> s(half(x))
- Signature:
{half/1,log/1,half#/1,log#/1} / {0/0,s/1,c_1/0,c_2/1,c_3/0,c_4/1}
- Obligation:
innermost runtime complexity wrt. defined symbols {half#,log#} and constructors {0,s}
+ Applied Processor:
EmptyProcessor
+ Details:
The problem is already closed. The intended complexity is O(1).
WORST_CASE(?,O(n^1))